package com.zzu.base.controller.auth.vo;

import lombok.Data;
import jakarta.validation.constraints.*;

@Data
public class LoginReqVO {
    @NotBlank(message = "用户名不能为空")
    @Size(min = 1, max = 20, message = "用户名长度为1-20个字符")
    @Pattern(regexp = "^[\\u4e00-\\u9fa5a-zA-Z0-9]*$", message = "用户名只能包含中文、字母、数字和下划线")
    private String userName;

    @NotBlank(message = "密码不能为空")
    @Size(min = 12,max = 20,message = "密码长度为12-20个字符")
    @Pattern(
            regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[@$!%*?&])[A-Za-z\\d@$!%*?&]*$",
            message = "密码必须包含大小写字母、数字和特殊符号（@$!%*?&），且不能包含其他字符"
    )
    private String password;
}
